﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using YArchitech.LIB;
using YArchitech.LIB.YJKControls;

namespace YArchitech.MEP
{
	public partial class ProtectRangeAddMannerForm : System.Windows.Forms.Form
	{
		public ProtectRangeAddMannerForm()
		{
			this.InitializeComponent();
			new YJKProcessTools().ShowInTaskbarChange(this);
		}

		private void btnOk_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.OK;
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.Cancel;
		}

		public AddManner SelectAddManner
		{
			get
			{
				return this.selectAddManner;
			}
		}

		private void rbtnManualAdd_CheckedChanged(object sender, EventArgs e)
		{
			if (this.rbtnManualAdd.Checked)
			{
				this.selectAddManner = AddManner.ManualAdd;
				return;
			}
			if (this.rbtnActiveViewAutoAdd.Checked)
			{
				this.selectAddManner = AddManner.ActiveViewAutoAdd;
				return;
			}
			if (this.rbtnAllModelAutoAdd.Checked)
			{
				this.selectAddManner = AddManner.AllModelAutoAdd;
			}
		}

		private AddManner selectAddManner;
	}
}
